import java.util.Scanner;
public class Lab04_Task03 {
public static void main(String[] args) {
Scanner s = new Scanner(System.in);
String fn = s.nextLine();
String line = s.nextLine();
String[] smarks = line.split("\\s+");
double mark1 = Double.parseDouble(smarks[0]);
double mark2 = Double.parseDouble(smarks[1]);
double mark3 = Double.parseDouble(smarks[2]);
double avg = (mark1+mark2+mark3)/3;
String gl = "";
String com = "";
if (mark1<0 || mark2<0 ||mark3<0){
gl = "X";
com = "Invalid Marks!!, Negative marks not allowed.";
} else {
if ( mark1 > 100 || mark2 > 100 || mark3 > 100 ) {
gl = "X";
com = "Invalid Marks!!, Marks too high.";
} else {
if (avg >= 80) {
gl = "1";
com = "Magnificent!!";
} else if (avg >= 70) {
gl = "2";
com = "Excellent!!";
} else if (avg >= 60) {
gl = "3";
com = "Good work!!";
} else if (avg >= 50) {
gl = "4";
com = "Good!!";
} else {
gl = "0";
com = "Fail - Try again next Year!!";
}}
}
System.out.println("Student name: "+fn);
System.out.println("Grade Level: "+gl);
System.out.println("Comment: "+com);
}
}